<?php
	App::import("Model","Config.BaseConfig");
	class PaidListingConfig extends BaseConfig
	{
		var $name ="PaidListingConfig";
		var $cache = true;
		var $fieldProperties = array(
			'status' => array('label'=>"Paid Listing Status","type"=>"select",'group'=>array("add"),'default'=>0),
			'currency' => array('type'=>"text",'class'=>'vsmall_input','label'=>"Payment Currency (USD,GBP)",'group'=>array("add"),'default'=>"USD",'validate'=>VALID_NOT_EMPTY),
			'currency_symbol' => array('label'=>"Currency symbol  (\$, &pound;)","type"=>"text",'class'=>'vsmall_input','group'=>array("add"),'default'=>"\$"),
			'tax' => array('label'=>"Tax(%) to be applied on Invoice",'type'=>"text",'class'=>'vsmall_input','group'=>array("add")),
			'term_of_service' => array('label'=>"Term of Service (Will be displayed on Invoice page before checkout)",'type'=>"editor",'row'=>10,'col'=>30,'group'=>array("add"),'validate'=>false),
			'company_logo' => array("label"=>"Company logo for invoice",'type'=>"text",'group'=>array("add")),
			'business_information' => array("label"=>"Your business information to display on Invoice",'group'=>array("add"),'type'=>"textarea"),
            'pre_expiration_notification'=>array("type"=>"select",'label'=>"How many days before plan expiration an E-mail should be send notifying about plan expiration?",'group'=>array("add")),
            'notify_expiration' => array('type'=>"checkbox",'label'=>"Send an E-mail to owner when his listing's plan expires?",'group'=>array("add")),
        );
		
		function initialize()
		{
			$this->fieldProperties['status']['options'] = array(__("Disabled"),__("Enabled"));
			$this->fieldProperties['pre_expiration_notification']['options'] = array(''=>__("Never"),'1'=>__('1 day'),'2'=>__("2 days"),'5'=>__("5 days"),'7'=>__("1 week"),'14'=>__("2 weeks"),'21'=>__("3 weeks"),'30'=>__("1 month")); 
            $this->fieldProperties['pre_expiration_notification']['default'] = "";
            $this->fieldProperties['company_logo']['after'] = __("Upload logo in /app/plugins/paidlistings/vendors/img folder");
			parent::initialize();
		}
	}
?>